package com.example.demo.controller;


import com.example.demo.pojo.Admin;
import com.example.demo.service.AdminService;
import com.example.demo.vo.ResultVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author sjy
 * @since 2025-05-25
 */
@RestController
@RequestMapping("/admin")
@Api(tags = "管理员管理")
public class AdminController {
    @Autowired
    private AdminService adminService;

    @PostMapping("/adminLogin")
    @ApiOperation("管理员登录接口")
    public ResultVO<Admin> adminLogin(String account, String password) throws Exception {
        return adminService.adminLogin(account,password);
    }

}
